package com.mon.servlet;

import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.mon.test.PostJvmAgentLoader;
import com.test.bean.Address;

public class MonitorServlet extends HttpServlet{

	
	private static final long serialVersionUID = 6536468150744033431L;
	
	
	
	public void init() throws ServletException
	  {
	      // Do required initialization
		PostJvmAgentLoader.loadAgent();
		Address s=new Address();
		try {
			System.out.println(s.getFname());
		} catch (InterruptedException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	  }

	  public void doGet(HttpServletRequest request,
	                    HttpServletResponse response)
	            throws ServletException, IOException
	  {
	      // Set response content type
	      response.setContentType("text/html");
	      Address s=new Address();
			try {
				System.out.println(s.getFname());
			} catch (InterruptedException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
	      // Actual logic goes here.
	      PrintWriter out = response.getWriter();
	      out.println("<h1>" + "abc" + "</h1>");
	  }
	  
	  public void destroy()
	  {
	      // do nothing.
	  }
	
	
	
	

}
